home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12365 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: lerc.nasa.gov!purdue!yuma!steffend
  2. From: steffend@lamar.colostate.edu (Dave Steffen)
  3. Newsgroups: comp.lang.c,comp.lang.c++
  4. Subject: Re: Statistically Random Number algorithm
  5. Followup-To: comp.lang.c,comp.lang.c++
  6. Date: 19 Mar 1996 17:48:45 GMT
  7. Organization: Colorado State University, Fort Collins, CO  80523
  8. Message-ID: <4ims1t$193o@yuma.ACNS.ColoState.EDU>
  9. References: <314D0B67.3C16@psu.edu>
  10. NNTP-Posting-Host: glitch.physics.colostate.edu
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Jason A. Soloff (jas251@psu.edu) wrote:
  14. > Hi all...
  15. >  
  16. > I am working on a monte carlo simulation program to model some problems 
  17. > in astronomy.  One thing I am running into, however, is the problem of 
  18. > the pseudo-random number tables.  Does anyone have an algorithm (or 
  19. > code) for a truly statistically random number generator?
  20.  
  21.     Of course, _truly_ random numbers need special hardware;
  22. however, there are routines that are quite good at generating
  23. _statistically uncorrelated_ numbers. Check out "Numerical Recipes in
  24. C" 2nd Ed. Chapter 7 for several good ones. There may be better ones
  25. out there but (so far) NumRec's stuff is good enough for me.
  26.  
  27.                                  /\
  28.                                  \/
  29.  
  30. Dave Steffen                      No, his mind is not for rent
  31. Dept. of Physics                  To any God or Government
  32. Colorado State University         Always hopeful, yet discontent
  33. steffend@lamar.colostate edu      He knows changes aren't permanent-
  34.                       But change is...
  35. "Speak softly...                    
  36. ... and carry a black belt!"              -Neal Peart / RUSH
  37. -----------------------------------------------------------------------
  38.